# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=argus-clients
pkgver=3.0.8.2
pkgrel=2
groups=('blackarch' 'blackarch-networking' 'blackarch-defensive'
        'blackarch-sniffer')
pkgdesc='Network monitoring client for Argus.'
arch=('x86_64' 'aarch64')
url='http://qosient.com/argus/'
depends=('libedit' 'geoip' 'libmariadbclient' 'libsasl' 'pcre'
         'libtirpc-compat')
license=('GPL3')
source=("http://qosient.com/argus/src/argus-clients-$pkgver.tar.gz")
sha512sums=('20aac16bd6474b8f98c8fc86b21ad0b43aca62264c6de2f7f26eea876a90f7276cdaf2241a510a19ae445f40f5d0d05ec6a5869980b6889e6eb5937dbff0f855')

build() {
  cd "$pkgname-$pkgver"

  ./configure --sbindir=/usr/bin --prefix=/usr --with-sasl --with-GeoIP \
    --with-mysql --with-libpcre --with-libft --with-readline --with-perl

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"

  mv $pkgdir/usr/argus $pkgdir/usr/share/

  chmod 644 $pkgdir/usr/lib/argus_*.a
}

